import request from '@/utile/request.js'
const getUserinfoAPI = () => {
  return request({
    url: '/v1_0/user'
  })
}
const setUserinfoAPI = () => {
  return request({
    url: '/v1_0/user/profile'
  })
}
const changePhotoAPI = fd => {
  return request({
    url: '/v1_0/user/photo',
    method: 'PATCH',
    data: fd
  })
}
const changeNameAPI = ({ birthday, name }) => {
  return request({
    url: '/v1_0/user/profile',
    method: 'PATCH',
    data: {
      birthday,
      name
    }
  })
}
export { getUserinfoAPI, setUserinfoAPI, changePhotoAPI, changeNameAPI }
